package deepr.handler;

import deepr.core.DisposeContext;
import deepr.entity.Response;
import deepr.exception.DeeprAssert;
import deepr.exception.DeeprException;
import org.springframework.stereotype.Component;

@Component
public class OrgTableSchemaHandler extends BaseSchemaHandler {

  @Override
  public String getTableName(DisposeContext ctx, String name) throws DeeprException {
    String orgId = ctx.getString("orgId");
    DeeprAssert.isTrue(!orgId.contains("'"), "input_error");
    return orgId + "." + name;
  }

}
